package net.mysoft.budgetsoft.system.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * 资源
 * @author kangrui
 *
 */
@Table(name="t_resource")
@Entity
public class TResource extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2878601622648982086L;
	@Column(length=20)
	private String url;					//资源地址/链接地址
	@ManyToMany(mappedBy="resources")
	private List<TRole> roles;			//拥有该资源的角色
	
	public List<TRole> getRoles() {
		return roles;
	}
	public void setRoles(List<TRole> roles) {
		this.roles = roles;
	}
	
}
